WorldWindow

open class WorldWindow @JvmOverloads constructor(renderResourceCache: RenderResourceCache = RenderResourceCache(), capabilities: GLCapabilities = defaultCapabilities(), factory: (WorldWind) -> Unit) : JPanel, WorldWind.EventListener

Provides a WorldWind window that implements a virtual globe inside the Swing view hierarchy. By default, WorldWindow is configured to display an ellipsoidal globe using the WGS 84 reference values.

Parameters

renderResourceCache

render resource cache shared with the engine lifecycle

capabilities

OpenGL capabilities used to create the internal GLCanvas

factory

DSL block invoked during initialization to populate WorldWind.layers

Constructors

Link copied to clipboard
constructor(renderResourceCache: RenderResourceCache = RenderResourceCache(), capabilities: GLCapabilities = defaultCapabilities(), factory: (WorldWind) -> Unit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:BeanProperty(bound = false)
open val accessibleContext: AccessibleContext?
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(description = "The preferred horizontal alignment of the component.")
open var alignmentX: Float
Link copied to clipboard
@set:BeanProperty(description = "The preferred vertical alignment of the component.")
open var alignmentY: Float
Link copied to clipboard
@get:BeanProperty(bound = false)
open val ancestorListeners: Array<out AncestorListener?>?
Link copied to clipboard
@set:BeanProperty(bound = false, expert = true, description = "Determines if this component automatically scrolls its contents when dragged.")
open var autoscrolls: Boolean
Link copied to clipboard
@set:BeanProperty(preferred = true, visualUpdate = true, description = "The background color of the component.")
open var background: Color?
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(preferred = true, visualUpdate = true, description = "The component's border.")
open var border: Border?
Link copied to clipboard
open var bounds: Rectangle?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(preferred = true, description = "Popup to show")
open var componentPopupMenu: JPopupMenu?
Link copied to clipboard
open val components: Array<out Component?>?
Link copied to clipboard
Link copied to clipboard

Current WorldWindow camera and gestures controller.

Link copied to clipboard
open var cursor: Cursor?
Link copied to clipboard
@set:BeanProperty(bound = false, preferred = true, enumerationValues = ["DebugGraphics.NONE_OPTION", "DebugGraphics.LOG_OPTION", "DebugGraphics.FLASH_OPTION", "DebugGraphics.BUFFERED_OPTION"], description = "Diagnostic options for graphics operations.")
open var debugGraphicsOptions: Int
Link copied to clipboard
Link copied to clipboard
lateinit var engine: WorldWind

Main WorldWind engine, containing globe, terrain, renderable layers, camera, viewport and frame rendering logic.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(preferred = true, visualUpdate = true, description = "The font for the component.")
open var font: Font?
Link copied to clipboard
@set:BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.")
open var foreground: Color?
Link copied to clipboard

Native heavyweight AWT canvas — draws straight to its window surface, skipping the com.jogamp.opengl.awt.GLJPanel offscreen-FBO + glReadPixels + Java2D composite round-trip that's a major bottleneck on macOS. Exposed as a plain Component so consumers can attach focus / input listeners (e.g. KeyboardControls) without leaking the JOGL type.

Link copied to clipboard
@get:BeanProperty(bound = false)
open val graphics: Graphics?
Link copied to clipboard
Link copied to clipboard
@get:BeanProperty(bound = false)
open val height: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(description = "Whether or not the JPopupMenu is inherited")
open var inheritsPopupMenu: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(description = "The component's input verifier.")
open var inputVerifier: InputVerifier?
Link copied to clipboard
@get:BeanProperty(expert = true)
open val insets: Insets?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(expert = true, preferred = true, visualUpdate = true, description = "The enabled state of the component.")
open var isEnabled: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isFontSet: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:BeanProperty(bound = false)
open val isManagingFocus: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(expert = true, description = "The component's opacity")
open var isOpaque: Boolean
Link copied to clipboard
@get:BeanProperty(bound = false)
open val isOptimizedDrawingEnabled: Boolean
Link copied to clipboard
@get:BeanProperty(bound = false)
val isPaintingForPrint: Boolean
Link copied to clipboard
@get:BeanProperty(bound = false)
open val isPaintingTile: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isShowing: Boolean
Link copied to clipboard
open val isValid: Boolean
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(hidden = true, visualUpdate = true)
open var isVisible: Boolean
Link copied to clipboard

The controller used to manipulate the globe with the keyboard. Declared after glPanel so its initializer can attach listeners to the already-constructed Swing component.

Link copied to clipboard
open val keyListeners: Array<out KeyListener?>?
Link copied to clipboard
Link copied to clipboard
open var locale: Locale?
Link copied to clipboard
open var location: Point?
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(description = "The maximum size of the component.")
open var maximumSize: Dimension?
Link copied to clipboard
@set:BeanProperty(description = "The minimum size of the component.")
open var minimumSize: Dimension?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val mousePosition: Point?
Link copied to clipboard
Link copied to clipboard
open var name: String?
Link copied to clipboard
Link copied to clipboard
open val parent: Container?
Link copied to clipboard
@set:BeanProperty(preferred = true, description = "The preferred size of the component.")
open var preferredSize: Dimension?
Link copied to clipboard
Link copied to clipboard
@get:BeanProperty(bound = false)
open val registeredKeyStrokes: Array<out KeyStroke?>?
Link copied to clipboard
@get:BeanProperty(bound = false)
open val rootPane: JRootPane?
Link copied to clipboard

Renderable selection and drag gestures detector. Assign SelectDragDetector.callback to handle events.

Link copied to clipboard
open var size: Dimension?
Link copied to clipboard
open val toolkit: Toolkit?
Link copied to clipboard
@set:BeanProperty(bound = false, preferred = true, description = "The text to display in a tool tip.")
open var toolTipText: String?
Link copied to clipboard
@get:BeanProperty(bound = false)
open val topLevelAncestor: Container?
Link copied to clipboard
@set:BeanProperty(hidden = true, description = "Mechanism for transfer of data to and from the component")
open var transferHandler: TransferHandler?
Link copied to clipboard
Link copied to clipboard
@set:BeanProperty(hidden = true, visualUpdate = true, description = "The UI object that implements the Component's LookAndFeel.")
open var ui: PanelUI?
Link copied to clipboard
@get:BeanProperty(bound = false, expert = true, description = "A string that specifies the name of the L&F class.")
open val uiClassID: String?
Link copied to clipboard
@set:BeanProperty(description = "Whether the Component verifies input before accepting focus.")
open var verifyInputWhenFocusTarget: Boolean
Link copied to clipboard
Link copied to clipboard
@get:BeanProperty(bound = false)
open val visibleRect: Rectangle?
Link copied to clipboard
@get:BeanProperty(bound = false)
open val width: Int
Link copied to clipboard
@get:BeanProperty(bound = false)
open val x: Int
Link copied to clipboard
@get:BeanProperty(bound = false)
open val y: Int

Functions

Link copied to clipboard
open fun action(evt: Event?, what: Any?): Boolean
Link copied to clipboard
open fun add(popup: PopupMenu?)
open fun add(comp: Component?): Component?
open fun add(comp: Component?, constraints: Any?)
open fun add(comp: Component?, index: Int): Component?
open fun add(name: String?, comp: Component?): Component?
open fun add(comp: Component?, constraints: Any?, index: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun addNotify()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun bounds(): Rectangle?
Link copied to clipboard
open fun checkImage(image: Image?, observer: ImageObserver?): Int
open fun checkImage(image: Image?, width: Int, height: Int, observer: ImageObserver?): Int
Link copied to clipboard
open fun computeVisibleRect(visibleRect: Rectangle?)
Link copied to clipboard
open operator fun contains(p: Point?): Boolean
open fun contains(x: Int, y: Int): Boolean
Link copied to clipboard
open fun countComponents(): Int
Link copied to clipboard
open fun createImage(producer: ImageProducer?): Image?
open fun createImage(width: Int, height: Int): Image?
Link copied to clipboard
open fun createToolTip(): JToolTip?
Link copied to clipboard
open fun createVolatileImage(width: Int, height: Int): VolatileImage?
open fun createVolatileImage(width: Int, height: Int, caps: ImageCapabilities?): VolatileImage?
Link copied to clipboard
open fun deliverEvent(e: Event?)
Link copied to clipboard
open fun disable()
Link copied to clipboard
Link copied to clipboard
open fun doLayout()
Link copied to clipboard
open fun enable()
open fun enable(b: Boolean)
Link copied to clipboard
open fun enableInputMethods(enable: Boolean)
Link copied to clipboard
open fun findComponentAt(x: Int, y: Int): Component?
Link copied to clipboard
open fun firePropertyChange(propertyName: String?, oldValue: Boolean, newValue: Boolean)
open fun firePropertyChange(propertyName: String?, oldValue: Byte, newValue: Byte)
open fun firePropertyChange(propertyName: String?, oldValue: Char, newValue: Char)
open fun firePropertyChange(propertyName: String?, oldValue: Double, newValue: Double)
open fun firePropertyChange(propertyName: String?, oldValue: Float, newValue: Float)
open fun firePropertyChange(propertyName: String?, oldValue: Int, newValue: Int)
open fun firePropertyChange(propertyName: String?, oldValue: Long, newValue: Long)
open fun firePropertyChange(propertyName: String?, oldValue: Short, newValue: Short)
Link copied to clipboard
Link copied to clipboard
open fun getBaseline(width: Int, height: Int): Int
Link copied to clipboard
open fun getBounds(rv: Rectangle?): Rectangle?
Link copied to clipboard
Link copied to clipboard
open fun getComponent(n: Int): Component?
Link copied to clipboard
open fun getComponentAt(x: Int, y: Int): Component?
Link copied to clipboard
open fun getComponentZOrder(comp: Component?): Int
Link copied to clipboard
open fun getConditionForKeyStroke(aKeyStroke: KeyStroke?): Int
Link copied to clipboard
Link copied to clipboard
open fun getFontMetrics(font: Font?): FontMetrics?
Link copied to clipboard
open fun <T : EventListener?> getListeners(listenerType: Class<T?>?): Array<out T?>?
Link copied to clipboard
open fun getLocation(rv: Point?): Point?
Link copied to clipboard
open fun getMousePosition(allowChildren: Boolean): Point?
Link copied to clipboard
open fun getPopupLocation(event: MouseEvent?): Point?
Link copied to clipboard
open fun getSize(rv: Dimension?): Dimension?
Link copied to clipboard
open fun getToolTipLocation(event: MouseEvent?): Point?
Link copied to clipboard
open fun gotFocus(evt: Event?, what: Any?): Boolean
Link copied to clipboard
open fun grabFocus()
Link copied to clipboard
open fun handleEvent(evt: Event?): Boolean
Link copied to clipboard
open fun hasFocus(): Boolean
Link copied to clipboard
open fun hide()
Link copied to clipboard
open fun imageUpdate(img: Image?, infoflags: Int, x: Int, y: Int, w: Int, h: Int): Boolean
Link copied to clipboard
open fun insets(): Insets?
Link copied to clipboard
open fun inside(x: Int, y: Int): Boolean
Link copied to clipboard
open fun invalidate()
Link copied to clipboard
Link copied to clipboard
open fun keyDown(evt: Event?, key: Int): Boolean
Link copied to clipboard
open fun keyUp(evt: Event?, key: Int): Boolean
Link copied to clipboard
open fun layout()
Link copied to clipboard
open fun list()
open fun list(out: PrintStream?)
open fun list(out: PrintWriter?)
open fun list(out: PrintStream?, indent: Int)
open fun list(out: PrintWriter?, indent: Int)
Link copied to clipboard
open fun locate(x: Int, y: Int): Component?
Link copied to clipboard
open fun location(): Point?
Link copied to clipboard
open fun lostFocus(evt: Event?, what: Any?): Boolean
Link copied to clipboard
open fun minimumSize(): Dimension?
Link copied to clipboard
open fun mouseDown(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun mouseDrag(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun mouseEnter(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun mouseExit(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun mouseMove(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun mouseUp(evt: Event?, x: Int, y: Int): Boolean
Link copied to clipboard
open fun move(x: Int, y: Int)
Link copied to clipboard
open fun nextFocus()
Link copied to clipboard
open fun paint(g: Graphics?)
Link copied to clipboard
open fun paintAll(g: Graphics?)
Link copied to clipboard
Link copied to clipboard
open fun paintImmediately(x: Int, y: Int, w: Int, h: Int)
Link copied to clipboard
fun pick(x: Double, y: Double): PickedObjectList

Determines the WorldWind objects displayed at a screen point. The screen point is interpreted as coordinates in Swing screen pixels relative to this view.
If the screen point intersects any number of WorldWind shapes, the returned list contains a picked object identifying the top shape at the screen point. This picked object includes the shape renderable (or its non-null pick delegate) and the WorldWind layer that displayed the shape. Shapes that are hidden behind another shape or terrain at the screen point are omitted from the returned list.
If the screen point intersects the WorldWind terrain, the returned list contains a picked object identifying the associated geographic position. If there are no shapes in the WorldWind scene between the terrain and the screen point, the terrain picked object is marked as "on top".

Link copied to clipboard
fun pickAsync(x: Double, y: Double, width: Double = 0.0, height: Double = 0.0, pickCenter: Boolean = true): Deferred<PickedObjectList>

Determines the WorldWind shapes displayed in a screen rectangle. The screen rectangle is interpreted as GL viewport coordinates. Use viewportCoordinates to convert Swing screen pixels to GL viewport coordinates before calling this method.

Link copied to clipboard
fun pickShapesInRect(x: Double, y: Double, width: Double, height: Double): PickedObjectList

Determines the WorldWind shapes displayed in a screen rectangle. The screen rectangle is interpreted as coordinates in Swing screen pixels relative to this view.
If the screen rectangle intersects any number of WorldWind shapes, the returned list contains a picked object identifying all the top shapes in the rectangle. This picked object includes the shape renderable (or its non-null pick delegate) and the WorldWind layer that displayed the shape. Shapes that are entirely hidden behind another shape or terrain in the screen rectangle are omitted from the returned list.

Link copied to clipboard
open fun postEvent(e: Event?): Boolean
Link copied to clipboard
Link copied to clipboard
open fun prepareImage(image: Image?, observer: ImageObserver?): Boolean
open fun prepareImage(image: Image?, width: Int, height: Int, observer: ImageObserver?): Boolean
Link copied to clipboard
open fun print(g: Graphics?)
Link copied to clipboard
open fun printAll(g: Graphics?)
Link copied to clipboard
Link copied to clipboard
fun putClientProperty(key: Any?, value: Any?)
Link copied to clipboard
open fun registerKeyboardAction(anAction: ActionListener?, aKeyStroke: KeyStroke?, aCondition: Int)
open fun registerKeyboardAction(anAction: ActionListener?, aCommand: String?, aKeyStroke: KeyStroke?, aCondition: Int)
Link copied to clipboard
open fun remove(comp: Component?)
open fun remove(index: Int)
open fun remove(popup: MenuComponent?)
Link copied to clipboard
open fun removeAll()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun removeNotify()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun repaint()
open fun repaint(tm: Long)
open fun repaint(x: Int, y: Int, width: Int, height: Int)
open fun repaint(tm: Long, x: Int, y: Int, width: Int, height: Int)
open fun repaint(r: Rectangle?)
Link copied to clipboard
Link copied to clipboard
open fun requestFocus()
open fun requestFocus(cause: FocusEvent.Cause?)
open fun requestFocus(temporary: Boolean): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun requestRedraw()

Request that this WorldWindow update its display. Prior changes to this WorldWindow's camera, globe and layers (including layer contents) are reflected on screen sometime after calling this method. May be called from any thread.

Link copied to clipboard
Link copied to clipboard
open fun reshape(x: Int, y: Int, w: Int, h: Int)
Link copied to clipboard
open fun resize(d: Dimension?)
open fun resize(width: Int, height: Int)
Link copied to clipboard
open fun revalidate()
Link copied to clipboard
open fun scrollRectToVisible(aRect: Rectangle?)
Link copied to clipboard
open fun setComponentZOrder(comp: Component?, index: Int)
Link copied to clipboard
open fun setFocusTraversalKeys(id: Int, keystrokes: Set<out AWTKeyStroke?>?)
Link copied to clipboard
fun setInputMap(condition: Int, map: InputMap?)
Link copied to clipboard
open fun setMixingCutoutShape(shape: Shape?)
Link copied to clipboard
open fun show()
open fun show(b: Boolean)
Link copied to clipboard
open fun size(): Dimension?
Link copied to clipboard
open fun transferFocus()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun unmarkResourceAbsent(resourceId: Int)

Removes a resource ID from the missed resource list.

Link copied to clipboard
open fun unregisterKeyboardAction(aKeyStroke: KeyStroke?)
Link copied to clipboard
open fun update(g: Graphics?)
Link copied to clipboard
open fun updateUI()
Link copied to clipboard
open fun validate()
Link copied to clipboard

Converts Swing screen pixel coordinates to GL viewport coordinates by applying the screen density factor.